package com.york.tinyrpc.protoss.fault.retry;

import com.york.tinyrpc.protoss.model.TinyRpcResponse;

import java.util.concurrent.Callable;

/**
 * 不重试策略
 */
public class NoRetryStrategy implements RetryStrategy {

    /**
     * 不重试，就是只执行这次目标任务,不进行别的操作
     *
     * @param target
     * @return TinyRpcResponse
     * @throws Exception
     */
    public TinyRpcResponse doRetry(Callable<TinyRpcResponse> target) throws Exception {
        return target.call();
    }

}



